﻿@using ZR.CodeGenerator
@using ZR.Model.System.Generate
@using Infrastructure.Extensions;
@using ZR.Model.System.Model.Enums;
@* @model ZR.CodeGenerator.Model.GenerateDto; *@
@{
    var genTable = Model.GenTable;
    var genTableOptions=genTable.Options;
    var genOptions = Model.GenOptions;
    var replaceDto = Model.ReplaceDto;
    var entityClassName = genTable.EntityClassName;
}
using @(genOptions.DtosNamespace).@(genOptions.SubNamespace).Dto;
using @(genOptions.DtosNamespace).@(genOptions.SubNamespace).Entity;
using @(genOptions.ModelsNamespace).@(genOptions.SubNamespace);

namespace @(genOptions.IServicsNamespace).@(genOptions.SubNamespace).IService
{
    /// <summary>
    /// @(genTable.FunctionName)服务接口
    /// </summary>
    public interface I@(genTable.FunctionCode)ServiceBase : IBaseService<@(entityClassName)>
    {

    @if (replaceDto.ShowBtnAdd)
    {
            @:/// <summary>
            @:/// 添加@(genTable.FunctionName)
            @:/// </summary>
            @:/// <param name="model"></param>
            @:/// <returns></returns>
            @:Task<bool> Add@(genTable.FunctionCode)(@(entityClassName) model);
    }

    @if (replaceDto.ShowBtnDelete || replaceDto.ShowBtnMultiDel)
    {
            @:/// <summary>
            @:/// 删除@(genTable.FunctionName)
            @:/// </summary>
            @:/// <param name="ids"></param>
            @:/// <param name="isRealDel"></param>
            @:/// <returns></returns>
            @:Task<bool> Delete@(genTable.FunctionCode)(long[] ids, bool isRealDel = true);
    }

    @if (replaceDto.ShowBtnEdit)
    {
            @:/// <summary>
            @:/// 修改@(genTable.FunctionName)
            @:/// </summary>
            @:/// <param name="model"></param>
            @:/// <returns></returns>
            @:Task<bool> Modify@(genTable.FunctionCode)(@(entityClassName) model);

    }

    @if(genTableOptions.IsEnableStateChange)
    {
            @:/// <summary>
            @:/// 变更@(genTable.FunctionName)状态
            @:/// </summary>
            @:/// <param name="req"></param>
            @:/// <returns></returns>
            @:Task<bool> Change@(genTable.FunctionCode)State(Change@(genTable.FunctionCode)StateReq req);
    }

    @if (replaceDto.ShowBtnImport)
    {
            @:(string, object, object) Import@(genTable.FunctionCode)(List<@(genTable.FunctionCode)> list);
    }

    @if (genTableOptions.IsTreeTable)
    {
            @:/// <summary>
            @:/// 获取@(genTable.FunctionName)树选择列表
            @:/// </summary>
            @:/// <param name="req"></param>
            @:/// <returns></returns>
            @:Task<List<TreeNodeInfo>> Get@(genTable.FunctionCode)TreeSelectList(Get@(genTable.FunctionCode)TreeSelectListReq req);
    }

            /// <summary>
            /// 获取@(genTable.FunctionName)分页列表
            /// </summary>
            /// <param name="req"></param>
            /// <returns></returns>
            Task<PagedInfo<@(genTable.FunctionCode)ListItemDto>> Get@(genTable.FunctionCode)PageList(Get@(genTable.FunctionCode)PageListReq req);

        

            /// <summary>
            /// 获取@(genTable.FunctionName)详情
            /// </summary>
            /// <param name="id"></param>
            /// <returns></returns>
            Task<@(genTable.FunctionCode)DetailDto> Get@(genTable.FunctionCode)Detail(long id);

    

    }
}
